From: Andy Holmes Date: Wed, 1 Mar 2023 20:10:57 +0000 (-0800) Subject: quickSettings: Bind the outer button's toggle-mode to the inner buttons X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~393^2^2~50 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d5f868bb25f89cdab164553702f9296ea28087d3;p=gnome-shell.git quickSettings: Bind the outer button's toggle-mode to the inner buttons When the `QuickMenuToggle` was a discrete button, it could be set to toggle mode, but the inner buttons no longer reacts as expected. Bind the `toggle-mode` property between the `QuickMenuToggle` and its contents so they behave as single toggle when enabled. Part-of: --- diff --git a/js/ui/quickSettings.js b/js/ui/quickSettings.js index d0dc2e996..8ba5ac4f4 100644 --- a/js/ui/quickSettings.js +++ b/js/ui/quickSettings.js @@ -186,9 +186,13 @@ var QuickMenuToggle = GObject.registerClass({ }); this._box.add_child(this._menuButton); + this.bind_property('toggle-mode', + contents, 'toggle-mode', + GObject.BindingFlags.SYNC_CREATE); this.bind_property('checked', contents, 'checked', - GObject.BindingFlags.SYNC_CREATE); + GObject.BindingFlags.SYNC_CREATE | + GObject.BindingFlags.BIDIRECTIONAL); this.bind_property('title', contents, 'title', GObject.BindingFlags.SYNC_CREATE);